package org.etom.impl.connector.service;

import org.etom.connector.datatypes.IMoodleConnection;
import org.etom.connector.service.ConnectorException;
import org.etom.connector.service.MoodleConnector;
import org.etom.impl.connector.datatypes.MoodleConnectionImpl;

/**
 * The implementation of the Moodle connector service.
 */
public class MoodleConnectorImpl implements MoodleConnector {

  /**
   * @see org.etom.connector.service.MoodleConnector#getConnection(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
   */
  @Override
  public IMoodleConnection getConnection(String moodleUrl, String rpcServerUrl,
      String username, String password) throws ConnectorException {
    IMoodleConnection connection = new MoodleConnectionImpl(
        moodleUrl,
        rpcServerUrl,
        username,
        password);
    return connection;
  }

}
